Fix copying original bytes in dynamic patches #355
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Was originally going to make an issue for this but I ended up fixing it in the process. Original text detailing the bug below:
I think I've run into a bug with the output file when using dynamic patches. Here's one I wrote for the INFINITAS launcher:
I'm only replacing the first byte, so the rest is just there to make it sufficiently unique. I kept the wildcards in the
on
patch asXX
assuming it would only change the first byte and leave the rest untouched.After enabling the patch and saving the file, the output was a little different to what I expected.
It seems like the wildcard bytes are getting replaced with
00
instead of the original contents: